import React, { useState, useEffect } from "react";
import { Button } from "antd";
import type { AutoModelDataType } from "./index";

interface IProps {
  data: AutoModelDataType["analysisContent"];
  originData: AutoModelDataType;
  onLoad?: () => void;
}

const Step5: React.FC<IProps> = ({ originData, onLoad }) => {
  const [open, setOepn] = useState<boolean>(false);
  useEffect(() => {
    onLoad && onLoad();
  }, []);
  return (
    <>
      <div className="view-report">
        <div className="view-report-l">
          <div className="view-report-t">
            150万吨/年连续重整装置瓶颈分析报告
          </div>
          <div className="view-report-d">{originData.createTime}</div>
        </div>
        <Button
          type="primary"
          onClick={() => {
            setOepn(true);
          }}
        >
          查看
        </Button>
      </div>
      {/* <ChatAutoReportModal
        open={open}
        formData={originData}
        onCancel={() => {
          setOepn(false);
        }}
      ></ChatAutoReportModal> */}
    </>
  );
};

export default Step5;
